package net.sky.oa.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "MAIL_FOLDER")
public class MailFolder implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	  private Long id;
	  private String foldername;
	  private Long parentid;
	  private Integer deplevel;
	  private String path;
	  private Integer ispublic;
	  private Integer type;
	  private SysEmployee user;//员工id
	  
	  public MailFolder(){
	  }
	  
	    @Id 
		@SequenceGenerator(name="SQ_MAILFOLDER_ID",sequenceName="SQ_MAILFOLDER_ID",allocationSize=1)
		@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SQ_MAILFOLDER_ID")
		@Column(name = "ID", unique = true, nullable = false)
		public Long getId() {
			return id;
		}
	    
		public void setId(Long id) {
			this.id = id;
		}
        
		@Column(name = "FOLDERNAME")
		public String getFoldername() {
			return foldername;
		}

		public void setFoldername(String foldername) {
			this.foldername = foldername;
		}
        
		@Column(name = "PARENTID")
		public Long getParentid() {
			return parentid;
		}
 
		public void setParentid(Long parentid) {
			this.parentid = parentid;
		}
        
		@Column(name = "DEPLEVEL")
		public Integer getDeplevel() {
			return deplevel;
		}

		public void setDeplevel(Integer deplevel) {
			this.deplevel = deplevel;
		}
        
		@Column(name = "PATH")
		public String getPath() {
			return path;
		}

		public void setPath(String path) {
			this.path = path;
		}
        
		@Column(name = "ISPUBLIC")
		public Integer getIspublic() {
			return ispublic;
		}

		public void setIspublic(Integer ispublic) {
			this.ispublic = ispublic;
		}
        
		@Column(name = "TYPE")
		public Integer getType() {
			return type;
		}

		public void setType(Integer type) {
			this.type = type;
		}
        
		@ManyToOne(fetch = FetchType.EAGER)
		@JoinColumn(name = "USER_ID")
		public SysEmployee getUser() {
			return user;
		}

		public void setUser(SysEmployee user) {
			this.user = user;
		}
		
		

}
